<html><head><title>Plotting the Profile: deviance or information criterion for one of the terms (or hyper-parameters) in a GAMLSS model</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>prof.term(gamlss)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   prof.term">
<param name="keyword" value=" Plotting the Profile: deviance or information criterion for one of the terms (or hyper-parameters) in a GAMLSS model">
</object>


<h2>Plotting the Profile: deviance or information criterion for one of the terms (or hyper-parameters) in a GAMLSS model</h2>


<h3>Description</h3>

<p>
This functions plots the profile deviance for a chosen parameter included in the linear predictor of any of the <code>mu</code>, 
<code>sigma</code>, <code>nu</code> or <code>tau</code> models so profile confidence intervals can be obtained. In can also be used to plot the profile 
of a specified information criterion for any 
hyperparameter.
</p>


<h3>Usage</h3>

<pre>
prof.term(model = NULL, criterion = "GD", penalty = 2.5, other = NULL, 
         min = NULL, max = NULL, step = NULL, type = "o", xlabel = NULL, 
         plot = TRUE, term = TRUE, perc = 95, ... )
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>model</code></td>
<td>
this is a GAMLSS model, e.g. <br>
<code>model=gamlss(y~cs(x,df=this),sigma.fo=~cs(x,df=3),data=abdom)</code>, where <code>this</code> indicates the (hyper)parameter to be profiled</td></tr>
<tr valign="top"><td><code>criterion</code></td>
<td>
whether global deviance ("GD") or information criterion ("IC") is profiled. The default is <code>criterion="GD"</code></td></tr>
<tr valign="top"><td><code>penalty</code></td>
<td>
The penalty value if information criterion is used in <code>criterion</code>, default <code>penalty=2.5</code>  </td></tr>
<tr valign="top"><td><code>other</code></td>
<td>
this can be used to evaluate an expression before the actual fitting of the model</td></tr>
<tr valign="top"><td><code>min</code></td>
<td>
the minimum value for the parameter e.g. <code>min=1</code> </td></tr>
<tr valign="top"><td><code>max</code></td>
<td>
the maximum value for the parameter e.g.  <code>max=20</code></td></tr>
<tr valign="top"><td><code>step</code></td>
<td>
how often to evaluate the global deviance (defines the step length of the grid for the parameter) e.g. <code>step=1</code></td></tr>
<tr valign="top"><td><code>type</code></td>
<td>
what type of plot required. This is the same as in <code>type</code> for <code>plot</code>, default value is <code>type="o"</code>, that is, both line and points</td></tr>
<tr valign="top"><td><code>xlabel</code></td>
<td>
if a label for the axis is required </td></tr>
<tr valign="top"><td><code>plot</code></td>
<td>
whether to plot, <code>plot=TRUE</code> or save the results, <code>plot=FALSE</code>  </td></tr>
<tr valign="top"><td><code>term</code></td>
<td>
this has the value TRUE and it should be changed to FALSE if a profile global deviance is required for a hyperparameter so the IC are suppressed</td></tr>
<tr valign="top"><td><code>perc</code></td>
<td>
what % confidence interval is required</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
for extra arguments</td></tr>
</table>

<h3>Details</h3>

<p>
This function can be use to provide likelihood based confidence intervals for a parameter involved in terms in the linear predictor(s). 
These confidence intervals are more accurate than the ones obtained from the parameters' standard errors. 
The function can also be used to plot a profile information criterion (with a given penalty) against a hyperparameter. This can be used to check  
the uniqueness in hyperparameter determination using for example <code>find.df</code>.
</p>


<h3>Value</h3>

<p>
Return a profile plot (if the argument <code>plot=TRUE</code>) or the values of the parameters and the IC or GD values otherwise</p>

<h3>Warning</h3>

<p>
A dense grid (i.e. small step) evaluation of the global deviance can take a long time, so start with a sparse grid (i.e. large step) 
and decrease  gradually the step length for more accuracy.
</p>


<h3>Author(s)</h3>

<p>
Mikis Stasinopoulos <a href="mailto:d.stasinopoulos@londonmet.ac.uk">d.stasinopoulos@londonmet.ac.uk</a> and Bob Rigby <a href="mailto:r.rigby@londonmet.ac.uk">r.rigby@londonmet.ac.uk</a>
</p>


<h3>References</h3>

<p>
Rigby, R. A. and  Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), 
<EM>Appl. Statist.</EM>, <B>54</B>, part 3, pp 507-554.
</p>
<p>
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS  help files, (see also  <a href="http://www.gamlss.com/">http://www.gamlss.com/</a>). 
</p>
<p>
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R.
<EM>Journal of Statistical Software</EM>, Vol. <B>23</B>, Issue 7, Dec 2007, <a href="http://www.jstatsoft.org/v23/i07">http://www.jstatsoft.org/v23/i07</a>.
</p>


<h3>See Also</h3>

<p>
<code><a href="gamlss.html">gamlss</a></code>,  <code><a href="prof.dev.html">prof.dev</a></code>
</p>


<h3>Examples</h3>

<pre>
data(aids)
gamlss(y~x+qrt,family=NBI,data=aids)
mod&lt;-quote(gamlss(y ~ offset(this * x) + qrt, data = aids, family = NBI))
prof.term(mod, min=0.06, max=0.11, step=0.001)
mod1&lt;-quote(gamlss(y ~ cs(x,df=this) + qrt, data = aids, family = NBI))
prof.term(mod1, min=1, max=15, step=1, criterion="IC")
mod2 &lt;- quote(gamlss(y ~ x+I((x&gt;this)*(x-this))+qrt,family=NBI,data=aids))
prof.term(mod2, min=1, max=45, step=1, criterion="GD")
rm(mod,mod1,mod2)
</pre>



<hr><div align="center">[Package <em>gamlss</em> version 1.7-9 <a href="00Index.html">Index]</a></div>

</body></html>
